package chixing.day13.mycompareDemo;

import java.util.TreeSet;

public class MyCompareTest {
    public static void main(String[] args) {
        Student s1 = new Student(101, "alleq", 123456L, "5656454");
        Student s2 = new Student(102, "allem", 1231456L, "899654");
        Student s3 = new Student(103, "bill", 124356L, "789656454");
        Student s4 = new Student(104, "lucy", 125666L, "17856454");
        Student s5 = new Student(105, "allen", 12768756L, "25756454");

        TreeSet<Student> set = new TreeSet<>();

        System.out.println("s1 和 s1 比较：" + s1.compare(s1));//0
        System.out.println("s2 和 s1 比较：" + s2.compare(s1));//负数
        System.out.println("s3 和 s2 比较：" + s3.compare(s2));//正数
        System.out.println("s4 和 s1 比较：" + s4.compare(s1));//正数


    }
}
